import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Write a description of class Location here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Location
{
    /**
     * Act - do whatever the Location wants to do. This method is called whenever
     * the 'Act' or 'Run' button gets pressed in the environment.
     */
    int cenX = 0;
    int cenY = 0;
    
    private int offX = 0;
    private int offY = 0;
    private int rotation;
    public boolean isUsed = false;
    
    public Location(int cenx, int ceny, int rot){
    
        cenX = cenx;
        cenY = ceny;
        rotation = rot;
     
    } 
    
    public void setOff(int x, int y){
    offX = x;
    offY = y;
    }
    public void update(int x, int y){
    cenX = x;
    cenY = y;
    }
    public void setRotation(int x){
     rotation = x;
    }
    public int getRotation(){
      return rotation;
    }
    public int getRotation(int r){
      return rotation + r;
    }
    public int getRealX(){
    return cenX+offX;
    }
    public int getRealY(){
    return cenY+offY;
    }
    
}
